import request from '@/utils/request'
import { PageData } from '@/types/resp.ts'
import { Weibo, WeiboPageParam } from '@/types/api.ts'

// 获取微博分页列表
export const page = (param: WeiboPageParam): Promise<PageData<Weibo>> => {
  return request({
    url: '/portal/weibo/page',
    method: 'post',
    data: param,
  })
}

// 获取置顶微博列表
export const topList = (): Promise<Weibo[]> => {
  return request({
    url: '/portal/weibo/top/list',
    method: 'post',
    data: {},
  })
}
